
#include "multicast.h"

void multicast_test() {
	int i, j;
	msg_clksync* msg;
	struct sockaddr_in* group;
	int size = 3;

	//build a test message
	msg = (msg_clksync *)malloc(sizeof(msg_clksync));
	msg->type = MT_MULTICAST;
	msg->t0 = 0;
	msg->machine = 1;
	msg->iteratn = 0;

	//create test group
	group = (struct sockaddr_in *)malloc(sizeof(msg_clksync) * size);

	//send from each node to each group
	for (i = 0; i < size; i++) {
		basic_multicast(group, size, msg);
	}
}
